import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import "./css/index.scss"

import AegleSelect from "@/components/aegle-select/index";
Vue.component(AegleSelect.name, AegleSelect);
import AegleForm from "@/components/aegle-form/index";
Vue.component(AegleForm.name, AegleForm);
import AegleDialog from "@/components/aegle-dialog/index";
Vue.component(AegleDialog.name, AegleDialog);

import AegleTable from "@/components/aegle-table/index";
Vue.component(AegleTable.name, AegleTable);

import AegleInput from "@/components/aegle-input";
Vue.component(AegleInput.name, AegleInput);

import AegleRadio from "@/components/aegle-radio/index";
Vue.component(AegleRadio.name, AegleRadio);
import AeglePage from "@/components/aegle-page";
Vue.component(AeglePage.name, AeglePage);

import AegleDatePicker from '@/components/aegle-date-picker';
Vue.component(AegleDatePicker.name, AegleDatePicker);

import AegleSpan from '@/components/aegle-span/index';
Vue.component(AegleSpan.name, AegleSpan);



import AegleButton from '@/components/aegle-button/index';
Vue.component(AegleButton.name, AegleButton);

// import AegleSingleCheckbox from '@/components/aegle-single-checkbox';
// Vue.component(AegleSingleCheckbox.name, AegleSingleCheckbox);

import AegleCheckbox from '@/components/aegle-checkbox';
Vue.component(AegleCheckbox.name, AegleCheckbox);

import { connectService } from "@/utils/serviceTool/service";
Vue.prototype.$connectService = connectService;


Vue.config.productionTip = false;
Vue.use(ElementUI);

Vue.directive("src", {
  inserted(el, binding) {
    if (true) {
      el.src = binding.value;
    } else {
      el.src = `http://10.72.2.108:30000/file-path/test?id=${binding.value}`;
    }
  },
  update(el, binding) {
    el.src = `http://10.72.2.108:30000/file-path/test?id=${binding.value}`;
  },
});

new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
